﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master"
    Inherits="System.Web.Mvc.ViewPage<IceScream.ViewModels.ProductManagerViewModel>" %>
     <%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    New Product
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContent" runat="server">
    <h2>
        New Product</h2>
    <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
    <script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>

    <form id="Form1" action="" enctype="multipart/form-data" method="post" runat="server">

    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Fields</legend>
             
         <div class="editor-label">
            <%: Html.Label("Name") %>
        </div>      
        <div class="editor-field">
            <%: Html.TextBox("Name")%>
            <%: Html.ValidationMessage("Name")%>
        </div>

       <div class="editor-label">
            <%: Html.Label("Category") %>
        </div> 

        <div class="editor-label">            
            <%: Html.DropDownList("IdCat", new SelectList(Model.lstCategory, "Id", "Name", Model.sup_Product.IdCat))%>
        </div>

         <div class="editor-label">
            <%: Html.Label("Description")%>
        </div>  
       <div class="editor-field">
               <CKEditor:CKEditorControl ID="Description" BasePath="~/Content/ckeditor" runat="server" 
                FilebrowserImageBrowseUrl= '/Content/ckfinder/ckfinder.html'
                FilebrowserImageUploadUrl= '/Content/ckfinder/core/connector/asp/connector.asp'
                FilebrowserBrowseUrl='/Content/ckfinder/ckfinder.html'
                FilebrowserUploadUrl='/Content/ckfinder/core/connector/asp/connector.asp'>
                    <%: Model.sup_Product.Description%>
               </CKEditor:CKEditorControl>
                <%: Html.ValidationMessageFor(model => model.sup_Product.Description)%>
            </div>

         <div class="editor-label">
            <%: Html.Label("Price")%>
        </div>  
        <div class="editor-label">
            <%: Html.TextBox("Price")%>
            <%: Html.ValidationMessage("Price")%>
        </div>

         <div class="editor-label">
            <%: Html.Label("Image")%>
        </div>          
        <div class="editor-field">
            <input id="Image" name="Image" type="file" />
        </div>

        <div class="editor-label">
            <%: Html.Label("Active") %>
        </div>

        <div class="editor-field">
            <%: Html.CheckBox("Active")%>
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>

    </form>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
